﻿using System.Linq.Expressions;

namespace BW.IDAL
{
    public interface IBaseDAL<T>
    {
        /// <summary>
        /// 根据条件查询
        /// </summary>
        /// <param name="expression"></param>
        /// <returns></returns>
        Task<T> GetValue(Expression<Func<T, bool>> expression);
        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="t"></param>
        /// <returns></returns>
        Task<int> GetAdd(T t);
        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="t"></param>
        /// <returns></returns>
        Task<int> GetUpdate(T t);
        /// <summary>
        /// 显示
        /// </summary>
        /// <returns></returns>
        IQueryable<T> GetAll();
    }
}
